import Vue from "vue";
import VueRouter from "vue-router";
import Tabbar from '../views/Tabbar'
import Index from '../views/index/Index'

Vue.use(VueRouter);

const routes = [{
    path: '/login',
    component: () => import('../views/Login.vue')
  },
  {
    path: '/',
    component: Tabbar,
    children: [{
        path: '',
        component: Index
      },
      {
        path: 'questions',
        component: () => import('../views/questions/Index.vue')
      },
      {
        path: 'video',
        component: () => import('../views/video/Index.vue')
      },
      {
        path: 'me',
        component: () => import('../views/me/Index.vue')
      }
    ]
  }
];

const router = new VueRouter({
  routes
});

export default router;